# Contributor: Bart Ribbers <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
maintainer="team/kde <bribbers@disroot.org>"
pkgname=kwave
pkgver=24.08.2
pkgrel=0
pkgdesc="A sound editor by KDE"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://kwave.sourceforge.net/"
license="GPL-2.0-or-later"
makedepends="
	alsa-lib-dev
	audiofile-dev
	extra-cmake-modules
	fftw-dev
	flac-dev
	karchive5-dev
	kcompletion5-dev
	kconfig5-dev
	kconfigwidgets5-dev
	kcoreaddons5-dev
	kcrash5-dev
	kdbusaddons5-dev
	kdoctools5-dev
	ki18n5-dev
	kiconthemes5-dev
	kio5-dev
	kservice5-dev
	ktextwidgets5-dev
	kwidgetsaddons5-dev
	kxmlgui5-dev
	libsamplerate-dev
	libvorbis-dev
	opus-dev
	pulseaudio-dev
	qt5-qtbase-dev
	qt5-qtmultimedia-dev
	rsvg-convert
	samurai
	"
checkdepends="xvfb-run"
subpackages="$pkgname-libs $pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/multimedia/kwave.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/kwave-$pkgver.tar.xz"
options="!check" # No tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DWITH_OSS=OFF \
		-DWITH_MP3=OFF
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
9f1b0e49906650549514d497259ac296f1840fbeabaea0bfcd1d1387c5d98808a93ae2b06939142a510a40a33feec3d4543e6fea65fed3346b54b191276e54e2  kwave-24.08.2.tar.xz
"
